package com.example.demo.controller;


import com.example.demo.entity.ChineseIndex;
import com.example.demo.service.IChineseIndexService;
import com.example.demo.utils.R;
import com.example.demo.vo.ChineseIndexVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@Api(tags = "中国指数模块")
@RestController
@RequestMapping("/chineseIndex")
public class ChineseIndexController {

    @Autowired
    private IChineseIndexService service;

    @ApiOperation("分页获取中国指数列表")
    @GetMapping("/select")
    public R<List<ChineseIndexVo>> select(Integer pageNum, Integer pageSize){
        return R.success("查询成功",service.selectChineseIndex(pageNum,pageSize));
    }

}
